package camel.dsrawat.examples;

import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;

public class XmlBeanUnmarshall extends RouteBuilder {

	@Override
	public void configure() throws Exception {
		from("file://c:/Softwares/Test?noop=true")
		.convertBodyTo(String.class)
		.to("log:System.out.println")
		.unmarshal().xmlBeans()
		.log("After unmarshall")
		//.to("file://c:/Softwares/Test/result.jar")
		.log("After all done.");
		//.to("log:com.specsavers.liabOracleInterface.dsr.Ch02XmlBean?showAll=true");
		
	}

	public static void main(String[] args) throws Exception {
		CamelContext context = new DefaultCamelContext();
		XmlBeanUnmarshall router = new XmlBeanUnmarshall();
		context.addRoutes(router);

		context.start();
		Thread.sleep(10000);
		//context.stop();
	}

}

